package team.scau.laboratory_repair.common;

import team.scau.laboratory_repair.modules.po.*;

import java.sql.Timestamp;
import java.util.Date;

/**
 * @Description:创建一些提供测试PO
 * @Author:ZTF
 * @Date:2018/5/22 10:44
 */
public class PoUtil {
    public static Area getRandomArea(){
        return Area.builder()
                .name("东区实验楼")
                .createTime(new Timestamp((new Date()).getTime()))
                .updateTime(new Timestamp((new Date()).getTime()))
                .build();
    }
//    public static Location getRandomLocation(){
//        return Location.builder()
//                .areaId(1L)
//                .name("4楼")
//                .parentId(-1L)
//                .type(1)
//                .createTime(new Timestamp((new Date()).getTime()))
//                .updateTime(new Timestamp((new Date()).getTime()))
//                .build();
//    }
    public static User getRandomManageUser(){
        return User.builder()
                .leadershipId(-1L)
                .phoneNumber("13541312316")
                .role(2L)
                .username("root")
                .password("root")
                .createTime(new Timestamp((new Date()).getTime()))
                .updateTime(new Timestamp((new Date()).getTime()))
                .build();
    }
    public static Record getRandomRecord(){
        return Record.builder()
                .area(1L)
                .room("DS404")
                .detail("无法开机")
                .equipmentId("45")
                .equipmentName("电脑")
                .registrantName("ZTF")
                .registrantNumber("201525010627")
                .wechatOpenid("454545545")
                .createTime(new Timestamp((new Date()).getTime()))
                .updateTime(new Timestamp((new Date()).getTime()))
                .build();
    }
    public static RecordSubscription getRandomRecordSubscription(){
        return RecordSubscription.builder()
                .recordId(1L)
                .status(0)
                .subscription(2L)
                .createTime(new Timestamp((new Date()).getTime()))
                .updateTime(new Timestamp((new Date()).getTime()))
                .build();
    }
    public static RepairClassify getRandomRepairClassify(){
        return RepairClassify.builder()
                .locationId(1L)
                .name("电脑无法开机")
                .createTime(new Timestamp((new Date()).getTime()))
                .updateTime(new Timestamp((new Date()).getTime()))
                .build();
    }
    public static WechatUser getRandomWechatUser(){
        return WechatUser.builder()
                .name("张三")
                .nickname("李白")
                .openid("445454545")
                .password("123")
                .phoneNumber("13232323695")
                .subscribe(true)
                .userType(0)
                .createTime(new Timestamp((new Date()).getTime()))
                .updateTime(new Timestamp((new Date()).getTime()))
                .build();
    }
    public static RecordPhoto getRandomRecordPhoto(){
        return RecordPhoto.builder()
                .url("dfasdf")
                .build();
    }
}
